<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>余额记录</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" href="../../wx/css/iconfont.css" />
	    <link rel="stylesheet" href="../../wx/css/new.css" />
	    <link rel="stylesheet" href="../../wx/css/style.css" />
	    <link rel="stylesheet" href="../../wx/css/mall.css" />
	    <link rel="stylesheet" href="../../css/mui.min.css" rel="stylesheet" />
	</head>
<style>

	body,.mui-content{
		background: #FFFFFF;
	}
	
</style>
	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">余额记录</h1>
		</header>
		<div class="mui-content record_content" id="record_content">  
		    <ul class="record_list2" id="sj_score" v-for="item in items">
 				<li class="less clearfix"><div class="left">
 					<p class="list_nam">{{item.message}}</p>
 					<p class="list_time">{{item.add_time}}</p>
 				</div><div class="right" style="color: #008800;">{{item.balance}}</div></li>
		    </ul>  
			<input type="hidden" id="page" value="1" />
		    <div class="gerzl_btn gerzl_btn2" id="btn"><a href="{:url('member/tixian')}">余额提现</a></div>
		</div>
	</body>
</html>
<script src="../../js/mui.js"></script>
<script src="../../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/app.js"></script>
<script src="../../js/m.js"></script>
<script>
		var page=1;
		var news = new Vue({
				el: '#record_content',
				data: {
					
					items: [] //列表信息流数据
				}
			
		});
		mui.init({
		        pullRefresh: {
		            container: "#record_content", //下拉刷新容器标识
		            down: {
		            	style:"circle",
		                auto: false,
		                contentdown: "下拉可以刷新",
		                contentover: "释放立即刷新",
		                contentrefresh: "正在刷新...",
		                callback: pullDownFresh
		            },
		            up: {
						height:"10px",
		                auto: false,
		                range:'10px', //可选 默认100px,控件可下拉拖拽的范围
    					offset:'0px', //可选 默认0px,下拉刷新控件的起始位置
		                callback: pullupFresh
		            }
		        }
    		});
			function pullDownFresh(){
				console.log('22222');
				mui('#record_content').pullRefresh().endPulldownToRefresh();
			}
			function pullupFresh(){
				var data={ page: page+1};
				plus.nativeUI.showWaiting("加载中....",{padlock: true});//数据出来前显示等待加载框
				ajaxData(set.api_url+"Member/get_wallet",data,function(res){
					plus.nativeUI.closeWaiting();
					mui('#record_content').pullRefresh().endPullupToRefresh(false)
					var list=res.list;
					if(list && list.length > 0) {
						page++;
						news.items = news.items.concat(list);
					}
				});
				 
			}
		mui.plusReady(function() {
			plus.nativeUI.showWaiting("加载中....",{padlock: true});//数据出来前显示等待加载框
			var data={};
			data['page']=page;
			ajaxData(set.api_url+"Member/get_wallet",data,function(res){
				plus.nativeUI.closeWaiting();
				var list=res.list;
				if(list && list.length > 0) {
					page++;
					news.items = news.items.concat(list);
				}
			});		 
		});
</script>